<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="app">

        <!-- 只渲染一次 -->
        <h1 v-once>说一句：{{message}}</h1>
        <h2 v-text="message"></h2>
        <button @click="change">改变一下</button>
        <h2 v-html="content"></h2>
    </div>
    <script src="https://unpkg.com/vue@next"></script>
    <script>
        //用vue创建app
        const app = Vue.createApp({
            data: function () {
                return {
                    message: "Hello word",
                    content: `<span style="color:#77aaad;font-size: 24px;">学习简单指令啦</span>`
                }
            },
            change: function () {
                this.message = "好好学",
                    console.log(this.message)
            }
        })
        //挂载app
        app.mount("#app")
    </script>

</body>

</html>